package com.example.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.domain.Book;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BookDao extends BaseMapper<Book> {
    @Delete("delete from tbl_book where  id= ${id}")
    boolean delete(int id);
    @Insert("insert into  tbl_book values(null,#{book.name},#{book.type},#{book.description})")
    boolean insert_1(@Param("book") Book book);

}
